import request from '@/utils/request'
// import { LoginParamsType } from './data.d'

// 登录接口
export const login = (data: any): Promise<any> => request.post('/platformReport/login', data)

// 根据平台网址查询平台登陆首页信息
export const getInfo = (params: any): Promise<any> => request.get('/platformReport/getHomeInfo', { params })

// 根据手机号码和平台id查询用户的角色信息
export const phoneSearch = (data: any): Promise<any> => request.post('/platformReport/getAccountInfoByPhone', data)

// 字典
export const dict = (): Promise<any> => request.get('/platform/dict/selectAllDict')

// gheuserinfo
export const GETUSERINFO = (): Promise<any> => request.get('/platformReport/getUserInfo')

// 退出登录
export const quitLoginUser = (): Promise<any> => request.get('/platformReport/logout')

// 忘记密码接口
export const forgerPassword = (data: any): Promise<any> => request.post('/platformReport/resetPassword', data)

// 获取验证码
export const getVerifyCode = (params: any): Promise<any> => request.get('/platformReport/sendVerifyCode', { params })

// 获取树形结构
export const getSelectTree = (data?: any): Promise<any> =>
  request.get(`/platform/province/selectTree?${data ? `signUserLocationId=${data.mangeScopend}` : ''}`)
